﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Navigation;
using LybrixNursingCRMDesktop.FrameWork;

namespace LybrixNursingCRMDesktop
{
    /// <summary>
    /// Interaction logic for StartWindow.xaml
    /// </summary>
    public partial class StartWindow : NavigationWindow
    {
        public StartWindow()
        {
            InitializeComponent();

            var mainPage = new MainPage();
            mainPage.closeEvent += new MainPage.CloseLybrix(mainPage_closeEvent);
            NavigationService.Navigate(mainPage);

            ShowsNavigationUI = false;
        }

        void mainPage_closeEvent()
        {
            MessageBoxResult result = Messages.ShowInformation("GNR004", MessageBoxButton.YesNo);
            if (result == MessageBoxResult.Yes)
                Close();
        }
    }



   
}
